Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MWPW-157776 Prompt Card Block #805

Merged
merged 8 commits into from
Sep 25, 2024
Merged

MWPW-157776 Prompt Card Block #805

merged 8 commits into from
Sep 25, 2024

Conversation

TsayAdobe
Copy link
Collaborator

@TsayAdobe TsayAdobe commented Sep 16, 2024

  • The prompt card block is for a one-off prompt card
  • The variation template block is for a group of prompt cards that have some common settings. The common settings can be in a template.
  • The variation template, group block is for a group of prompt cards that have some common settings. It can be authored in a more compact fashion.
  • Unit tests have 100% coverage

Resolves: MWPW-157776

Test URLs:
https://promptcard--dc--adobecom.hlx.live/drafts/tsay/prompt-cards?martech=off
https://promptcard--dc--adobecom.hlx.live/drafts/tsay/prompt-cards-template?martech=off
https://promptcard--dc--adobecom.hlx.live/drafts/tsay/prompt-cards-template-group?martech=off

Please go to the Word docs to see the authoring experience.

Copy link

aem-code-sync bot commented Sep 16, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@codecov-commenter
Copy link

codecov-commenter commented Sep 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.71%. Comparing base (237d0f1) to head (06f8bb3).

Additional details and impacted files
@@            Coverage Diff             @@
##            stage     #805      +/-   ##
==========================================
+ Coverage   66.94%   67.71%   +0.76%     
==========================================
  Files          47       48       +1     
  Lines        7431     7604     +173     
==========================================
+ Hits         4975     5149     +174     
+ Misses       2456     2455       -1     
Flag Coverage Δ
67.71% <100.00%> (+0.76%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@overmyheadandbody overmyheadandbody left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few CSS suggestions, since I accidentally stumbled upon this PR 🙂

acrobat/blocks/prompt-card/prompt-card.css Outdated Show resolved Hide resolved
acrobat/blocks/prompt-card/prompt-card.css Outdated Show resolved Hide resolved
acrobat/blocks/prompt-card/prompt-card.css Outdated Show resolved Hide resolved
acrobat/blocks/prompt-card/prompt-card.css Outdated Show resolved Hide resolved
acrobat/blocks/prompt-card/prompt-card.css Show resolved Hide resolved
acrobat/blocks/prompt-card/prompt-card.css Outdated Show resolved Hide resolved
acrobat/blocks/prompt-card/prompt-card.css Show resolved Hide resolved
import { readFile } from '@web/test-runner-commands';
import { expect } from '@esm-bundle/chai';
import sinon from 'sinon';
import { waitForElement, delay } from '../../helpers/waitfor.js';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <no-unused-vars> reported by reviewdog 🐶
'waitForElement' is defined but never used.

document.body.innerHTML = await readFile({ path: './mocks/body-json-more-less.html' });
await import('../../../acrobat/scripts/scripts.js');
await delay(500);
await new Promise((resolve) => requestAnimationFrame(resolve));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <no-promise-executor-return> reported by reviewdog 🐶
Return values from promise executor functions cannot be read.

import { readFile } from '@web/test-runner-commands';
import { expect } from '@esm-bundle/chai';
import sinon from 'sinon';
import { waitForElement, delay } from '../../helpers/waitfor.js';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <no-unused-vars> reported by reviewdog 🐶
'waitForElement' is defined but never used.

document.body.innerHTML = await readFile({ path: './mocks/body-json-more.html' });
await import('../../../acrobat/scripts/scripts.js');
await delay(500);
await new Promise((resolve) => requestAnimationFrame(resolve));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <no-promise-executor-return> reported by reviewdog 🐶
Return values from promise executor functions cannot be read.

@TsayAdobe
Copy link
Collaborator Author

@overmyheadandbody 🙏 Thank you for your valuable suggestions! I have updated the code.

@Blainegunn Blainegunn added this to the 0.2440 milestone Sep 25, 2024
@Blainegunn Blainegunn merged commit 55524e6 into stage Sep 25, 2024
5 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants